package com.yanqu.road.dao.db;

import java.lang.reflect.Field;

public class DbFieldInfo {

    /**
     * 是否入库
     */
    private boolean insert;

    /**
     * 对应的字段java类型
     */
    private Class classType;
    /**
     * 对应的sql类型
     */
    private int sqlType;
    /**
     * 对应的字段字段名
     */
    private String name;
    /**
     * 对应的数据库字段名
     */
    private String dbName;
    /**
     * 对应的字段类型
     */
    private boolean isSaveJson;
    /**
     * 对应的field类型
     */
    private Field field;
    /**
     * 对应的描述
     */
    private String comment;

    /**
     * 自增
     */
    private boolean autoIncrement;

    private String dataAttribute;

    public DbFieldInfo(boolean insert, Class classType, int sqlType, String name, String dbName, boolean isSaveJson, Field field, String comment, boolean autoIncrement, String dataAttribute) {
        this.insert = insert;
        this.classType = classType;
        this.sqlType = sqlType;
        this.name = name;
        this.dbName = dbName;
        this.isSaveJson = isSaveJson;
        this.field = field;
        this.comment = comment;
        this.autoIncrement = autoIncrement;
        this.dataAttribute = dataAttribute;
    }

    public boolean isInsert() {
        return insert;
    }

    public Class getClassType() {
        return classType;
    }

    public int getSqlType() {
        return sqlType;
    }

    public String getName() {
        return name;
    }

    public String getDbName() {
        return dbName;
    }

    public boolean isSaveJson() {
        return isSaveJson;
    }

    public Field getField() {
        return field;
    }

    public String getComment() {
        return comment;
    }

    public boolean isAutoIncrement() {
        return autoIncrement;
    }

    public String getDataAttribute() {
        return dataAttribute;
    }
}
